Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## rdlc.rdl
Class Map_Standard

    java.lang.Object
      rdlc.rdl.Declaration_Named
          rdlc.rdl.DynRoot_Standard
              rdlc.rdl.Map_Standard

All Implemented Interfaces:
  Declaration, DynRoot, Expression, Map

     class Map_Standard

extends DynRoot_Standard
implements Map

Standard map declaration, contains unit, platform and possibly map instances. Specific port and link map entries can be easily retrieved using `Map.getMapLink(UnitChannel)` and `Map.getMapPort(UnitPort)`.

Version:
  $Revision: 1.18 $
Author:
  Greg Gibeling

Nested Class Summary

Nested classes/interfaces inherited from interface rdlc.rdl.Expression
`Expression.Phase`

Field Summary
`protected java.util.Hashtable<java.lang.String,MapLink>` | `mapLinkTable` A hashtable from channel names to their MapLink entries.
`protected java.util.Hashtable<java.lang.String,MapPort>` | `mapPortTable` A hashtable from port names to the MapPort entries.
`protected int` | `nUnits` The number of unit instances in this map.
`protected PlatformInstance` | `platform` The platform that this map maps to.
`protected Expression.Phase` | `resolved` A flag to prevent us from trying to resolve this map twice.

Fields inherited from class rdlc.rdl.DynRoot_Standard
`instance, isLeaf, isRoot`

Fields inherited from class rdlc.rdl.Declaration_Named
`iName, namespace, rawStaticID`

Constructor Summary
`Map_Standard()` Standard constructor for a map being parsed in.
`Map_Standard(Namespace _namespace)` Default constructor for a map, used only when an identifier cannot be resolved.

Method Summary
`void` | `add(Field mapField, Log errorLog)` Add a map field to this map.
`protected void` | `generateMapTables(MapInstance _mapInstance, Log errorLog)` Generate the hashtable which are later used to look up port and link map entires based on the port and channel.
`MapLink` | `getMapLink(UnitChannel unitChannel)` Lookup the `MapLink` entry associated with the given channel.
`MapPort` | `getMapPort(UnitPort unitPort)` Lookup the `MapPort` entry associated with the given port.
`Instance` | `getPlatform()` Simple accessor.
`void` | `resolve(java.util.HashSet<Declaration> markSet, Log errorLog, Expression.Phase phase)` In addition to the standard identifier resolution routines, this method will perform all kinds of error checking related to what kinds of map fields are allowed in leaf and root maps.
`void` | `setNamespace(Namespace _namespace)` Takes care of setting not only the namespace for this declaration, but for the entire dynamic hierarchy rooted at this declaration.
`java.lang.String` | `toString()` Simple accessor.

Methods inherited from class rdlc.rdl.DynRoot_Standard
`getInstance, getLambdaName, getRequirements, isLeaf, isRoot, typeMatch`

Methods inherited from class rdlc.rdl.Declaration_Named
`getBase, getIdentifier, getNamedBase, getRawStaticID, getType, setRawStaticID`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Methods inherited from interface rdlc.rdl.DynRoot
`getInstance, isLeaf, isRoot`

Methods inherited from interface rdlc.rdl.Declaration
`getBase, getIdentifier, getLambdaName, getNamedBase, getType, setRawStaticID`

Methods inherited from interface rdlc.rdl.Expression
`getRequirements, typeMatch`

Field Detail

### resolved

    protected Expression.Phase resolved

  A flag to prevent us from trying to resolve this map twice. Basically to save us a lot of potentially wasted cycles.

### platform

    protected PlatformInstance platform

  The platform that this map maps to.

### nUnits

    protected int nUnits

  The number of unit instances in this map.

### mapLinkTable

    protected java.util.Hashtable<java.lang.String,MapLink> mapLinkTable

  A hashtable from channel names to their MapLink entries.

### mapPortTable

    protected java.util.Hashtable<java.lang.String,MapPort> mapPortTable

  A hashtable from port names to the MapPort entries.

Constructor Detail

### Map_Standard

    public Map_Standard()

  Standard constructor for a map being parsed in. Creates an empty instance.

### Map_Standard

    public Map_Standard(Namespace _namespace)

  Default constructor for a map, used only when an identifier cannot be resolved.

  Parameters:
    `_namespace` - The namespace to create this default map in.

Method Detail

### toString

    public java.lang.String toString()

  Simple accessor.

  Overrides:
    `toString` in class `Declaration_Named`
  Returns:
    A human readable representation of this map for debugging.

### add

    public void add(Field mapField,
                    Log errorLog)

  Add a map field to this map. This is used during parsing to add both instances and named fields. In addition this method tracks how many of certain fields are added to determine `DynRoot_Standard.isLeaf`.

  Parameters:
    `mapField` - The map field to be added to this map.
    `errorLog` - A list of all the errors to be reported.

### setNamespace

    public void setNamespace(Namespace _namespace)

  Description copied from class: `DynRoot_Standard`
  Takes care of setting not only the namespace for this declaration, but for the entire dynamic hierarchy rooted at this declaration.

  Specified by:
    `setNamespace` in interface `Expression`
  Overrides:
    `setNamespace` in class `DynRoot_Standard`
  Parameters:
    `_namespace` - The namespace in which this declaration was declared. This may not be the same as the one in which it is eventually bound.
  See Also:
    `DynRoot_Standard.setNamespace(Namespace)`

### resolve

    public void resolve(java.util.HashSet<Declaration> markSet,
                        Log errorLog,
                        Expression.Phase phase)

  In addition to the standard identifier resolution routines, this method will perform all kinds of error checking related to what kinds of map fields are allowed in leaf and root maps.

  Specified by:
    `resolve` in interface `Expression`
  Overrides:
    `resolve` in class `Declaration_Named`
  Parameters:
    `markSet` - Complete hash set of declarations on which the caller depends (including itself).
    `errorLog` - Log of errors to be reported to the user.
    `phase` - The phase of resolution to perform.
  See Also:
    `Expression.resolve(HashSet, Log, Phase)`

### generateMapTables

    protected void generateMapTables(MapInstance _mapInstance,
                                     Log errorLog)

  Generate the hashtable which are later used to look up port and link map entires based on the port and channel. This is a recursive function so that all of the ports and channels under this map will be listed.

  Parameters:
    `_mapInstance` - The map instance whose fields we wish to add to the hashtables.
    `errorLog` - A list of all the errors to be reported.
  See Also:
    `getMapLink(UnitChannel)`, `getMapPort(UnitPort)`

### getPlatform

    public Instance getPlatform()

  Description copied from interface: `Map`
  Simple accessor.

  Specified by:
    `getPlatform` in interface `Map`
  Returns:
    The platform to which this map is mapping all of it's unit instances.
  See Also:
    `Map.getPlatform()`

### getMapLink

    public MapLink getMapLink(UnitChannel unitChannel)

  Description copied from interface: `Map`
  Lookup the `MapLink` entry associated with the given channel.

  Specified by:
    `getMapLink` in interface `Map`
  Parameters:
    `unitChannel` - The channel we're looking for the mapping of.
  Returns:
    The `MapLink` for the given channel, or `null` if that channel is not specifically mapped.
  See Also:
    `Map.getMapLink(UnitChannel)`

### getMapPort

    public MapPort getMapPort(UnitPort unitPort)

  Description copied from interface: `Map`
  Lookup the `MapPort` entry associated with the given port.

  Specified by:
    `getMapPort` in interface `Map`
  Parameters:
    `unitPort` - The port we're looking for the mapping of.
  Returns:
    The `MapPort` for the given port, or `null` if that port is not specifically mapped.
  See Also:
    `Map.getMapPort(UnitPort)`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD